<?php  
	include_once("./commonality.php");
	error_reporting(E_ALL^E_NOTICE^E_WARNING);
	session_start();
	if(isset($_SESSION['account'])){
	$account=$_SESSION['account'];
	$sel="select * from user where uname='$account'";
	$res=mysql_query($sel);
	$arr_name=mysql_fetch_assoc($res);
	$img=$arr_name['touxiang'];	
	}
	$sql="select * from system";
	$ert=mysql_query($sql);
	while($ser=mysql_fetch_assoc($ert)){
		$li[]=$ser;
	}
 ?>
 <!DOCTYPE html>
 <html>
 <head>
 	<meta charset="utf-8">
 <?php	foreach ($li as $k=>$value) { 
 	if($value['cname']==cfg_title){?>
 	<title><?= $value['cvalue'] ?></title>
 <?php } } ?>
 </head>
	<style>
	/*{margin:0px;padding:0px;}*/
	.top{
	margin-left:50px;
	font-size:16px;
	/*border:2px solid red;*/
	}
	.top1{
		margin-left:500px;
		/*border:2px solid red;*/
	}
	.top2{
		width:230px;
		position:absolute;
		top:60px;
		left:50px;
		display:inline-block;
		/*border:2px solid red;*/
	}
	.top3{
		width:200px;
		height:30px;
		position:absolute;
		top:80px;
		left:450px;
		display:inline-block;
		/*border:2px solid red;*/
	}
	.top3 input{
		height:25px;
		/*border:2px solid #31CBE3;*/
		border-radius:5px;
		box-shadow:0px 0px 12px #BFBFBF;
	}
	.top4{
		position:absolute;
		top:2px;
		left:353px;
	}
	#navigation{
			width:100%;
			height:40px;
			/*border:2px solid red;*/
			background:#007dfb;
			line-height:40px;
	}
	#navigation ul li{
		float:left;
		list-style:none;
		margin-left:30px;
		font-size:18px;
		color:#ffffff;
		/*border:2px solid red;*/
	}
	
	#navigation ul li a{
		color:#ffffff;
		/*border:2px solid red;*/
	}
	.img{
		width:80px;
		height:90px;
		/*border:2px solid red;*/
		position:absolute;
		top:60px;
		left:300px;
		display:inline-block;
	}
	.d2{
		width:100%;
		height:100px;		
		/*border:2px solid red;*/
	}

	</style>
	<body>
		
	<span class="top">网站首页 &nbsp;&nbsp;&nbsp;用户中心 &nbsp;&nbsp;&nbsp;
		<a style="text-decoration:none; color:black;" href="gouwuche.php">我的购物车(<?= isset($_SESSION['cart'])?count($_SESSION['cart']):0?>)</a>&nbsp;&nbsp;&nbsp;
		<a style="text-decoration:none; color:black;"href="order_list.php">我的订单</a></span>
	<span class="top1"><b>欢迎来到欣才商城!</b> &nbsp;|&nbsp;
	<?= isset($_SESSION["account"])?"<img src='$img' width='20px'>":"" ?>
	
	<?= isset($_SESSION["account"])?$_SESSION["account"]:"<a href='./register1.php'>登录</a>" ?>  &nbsp;|&nbsp;
	<?= isset($_SESSION["account"])?"":"<a href='./register3.php'>免费注册</a>&nbsp;|&nbsp; " ?>
			<a href="./out.php">退出 </a></span>		
	<hr>
	<div class="d2">
	<div class="top2">
		<font color="blue" size="10px">欣才</font>&nbsp;&nbsp;&nbsp;<font size="10px">商城</font>
	</div>
	<div class="img">
		<img src="./img/mouse.png" width="80px">
	</div>
		<div class="top3">
			<form action="index.php" method="post">
			<input  type="text" name="find" value="" size="50px">
			<input class="top4" type="image" name="sub" src="./img/sogo.png">
			</form>
		</div>
	</div>
	<div id="navigation">
		<ul>
			<li><a style="text-decoration:none" href="shouye.php">首页</a></li>
			<li>|</li>
			<li><a style="text-decoration:none" href="./index.php">商城</a></li>
			<li>|</li>
			<li><a style="text-decoration:none" href="news1.php">新闻</a></li>
		</ul>
	</div>
	</body>
	</html>